//
//  SharedViewController.m
//  QuickCure1
//
//  Created by maoge on 16/10/30.
//  Copyright © 2016年 maoge. All rights reserved.
//

#import "SharedViewController.h"
#import "SharedBarView.h"


@implementation SharedViewController

#pragma mark - 屏蔽父类viewdidload方法(父类中将背景设为了白色)
- (void)viewDidLoad {
    
}

#pragma mark - 构造方法
- (instancetype)init {
    
    if (self = [super init]) {
        
        [self setupUI];
    }
    
    return self;
}


#pragma mark - 搭建UI
- (void)setupUI {
    
    //遮罩
    UIView *coverView = [[UIView alloc] initWithFrame:KeyWindow.frame];
    [self.view addSubview:coverView];
    
    coverView.backgroundColor = [UIColor blackColor];
    coverView.alpha = 0;
    
    //底部弹出分享view
    SharedBarView *barView = [SharedBarView barView];
    [self.view addSubview:barView];
    
    barView.frame = CGRectMake(0, KeyWindow.height, KeyWindow.width, 80);
    barView.backgroundColor = [UIColor whiteColor];
    
    //动画
    [UIView animateWithDuration:0.25 animations:^{
        
        coverView.alpha = 0.5;
        
        barView.transform = CGAffineTransformMakeTranslation(0, -80);
    }];
    
    _coverView = coverView;
    _barView = barView;
    
}








@end
